public class Test1 {
    public static void main(String[] args) {
        StringBuffer sb1=new StringBuffer();
        System.out.println("sb1："+sb1.length());
        System.out.println("sb1："+sb1.capacity());
        StringBuffer sb2=new StringBuffer(4);
        System.out.println("sb2："+sb2.length());
        System.out.println("sb2："+sb2.capacity());
        StringBuffer sb3=new StringBuffer("12345");
        System.out.println("sb3："+sb3.length());
        System.out.println("sb3："+sb3.capacity());

    }
}
